<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--导航条-->
<DIV class=headerNav>
  <UL class=headerNavMain>
      <LI class=allnav><A class=drop onClick="" href="#">所有商品分类</A>	  
	    <UL class=navlist>	
		   <div class=subitem></div>
	       <LI>水果蔬菜、肉类<div class=footimg></div></LI>
		   <LI>粮油调料、干货<div class=footimg></div></LI>
		   <LI>食品饮料、酒水<div class=footimg></div></LI>
		   <LI>母婴用品、玩具<div class=footimg></div></LI>
		   <LI>美容化妆护理<div class=footimg></div></LI>		 
		   <LI>家居生活用品<div class=footimg></div></LI>  
		   <LI>衣服、鞋帽、饰品<div class=footimg></div></LI>
		   <LI>文具、办公用品<div class=footimg></div></LI>
		   <LI>鲜花、礼品、蛋糕<div class=footimg></div></LI>
	    </UL>
	  </LI>
      <LI class="firstnav"><A onClick="" href="#">首  页</A></LI>
      <LI class=itemnav><A onClick="" href="">团  购</A></LI>
	  <LI class=itemnav><A onClick="" href="">秒  杀</A></LI>     
	  <LI class="itemnav"><A onClick="" href="">抽  奖</A></LI> 
	  <LI class=itemnav><A onClick="" href="">游  戏</A></LI>

	  <div class=cartpay>
         <span class=cart>购物车</span>
	     <span class=cartnum>5件</span>
	     <span class=pay>去结算</span>
      </div> 
  </UL>
</DIV>
<script language="javascript" type="text/javascript">
var subitem='{"id":"0","title":"水果蔬菜、肉类","secitem":[{"id":"101","title":"水果","subitem":[{"id":"0","title":"国产水果"},{"id":"0","title":"国产水果"},{"id":"0","title":"国产水果"},{"id":"0","title":"国产水果"},{"id":"0","title":"水果"},{"id":"0","title":"国产水果"},{"id":"0","title":"国产水果"},{"id":"0","title":"国产水果"},{"id":"0","title":"国产水果"},{"id":"0","title":"国产水果"}]},{"id":"101","title":"蔬菜","subitem":[{"id":"0","title":"蔬菜1"},{"id":"0","title":"蔬菜2"},{"id":"0","title":"蔬菜3"},{"id":"0","title":"蔬菜4"},{"id":"0","title":"e蔬菜5"}]},{"id":"101","title":"饼干糕曲点","subitem":[{"id":"0","title":"蛋糕/派"},{"id":"0","title":"威化"},{"id":"0","title":"饼干"},{"id":"0","title":"曲奇"},{"id":"0","title":"传统糕饼"},{"id":"0","title":"蛋卷"}]},{"id":"101","title":"肉类","subitem":[{"id":"0","title":"肉类1"},{"id":"0","title":"肉类2"},{"id":"0","title":"肉类3"},{"id":"0","title":"肉类4"},{"id":"0","title":"肉类5"}]}]}';

var obj=eval('('+subitem+')');
var html='';
for(i=0;i<obj.secitem.length;i++)
{
html=html+'<dl><dt><a href="#">'+obj.secitem[i].title+'</a></dt>';
  for(j=0;j<obj.secitem[i].subitem.length;j++)
  {
   html=html+'<dd><a href="#">'+obj.secitem[i].subitem[j].title+'</a></dd>';  
  }
  html=html+'</dl>';
}


    $(function(){
	  
		 $(".allnav").hover(function(){
            $(this).find('.navlist').show();
             },
          function(){
          // $(this).find('.navlist').hide();
          }
        );	
		 	
		 $(".navlist").hover(function(){
            $(".subitem").show();
             },
          function(){
           $(".subitem").hide();
		    $(".navlist LI").css("border-top","#e4e4e4 1px solid");
		    $(".footimg").hide();
          }
        );	
		$(".navlist LI").hover(function(){
		   $(".navlist LI").css("border-top","#e4e4e4 1px solid");
		   $(".footimg").hide();
		   $(this).css("border-top","#b00000 1px solid");
		   $(this).next('LI').css("border-top","#b00000 1px solid");
		   $(this).find('.footimg').show();
		   <!--获取subitem数据  -->
		    $(".subitem").html(html);
             },
          function(){
          }
        );	
			
	});

</script>